package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.pojos.WmNews;
import com.heima.model.wemedia.pojos.WmNewsMaterial;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WmNewsMaterialMapper extends BaseMapper<WmNewsMaterial> {

    /**
     * 批量新增
     * @param materialIds
     * @param newsId
     * type 表示素材来源引入的类型，type=1表示主图引用，0表示内容引用
     */
    public void saveBatch(@Param("materialIds") List<Integer> materialIds, @Param("newsId") Integer newsId,@Param("type") Integer type);
}